<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // every 类似于 &&   一假则假，都为真结果才是真
      // some  类似于 ||   一真则真，都为假结果才是假

      // every用在找都要满足的情况，例如有个数组，要判断数组里是不是都是偶数
      const list = [10, 11, 20, 30]
      // const res = list.every( v => {
      //     return v % 2 == 0
      // })
      const res = list.every(v => v % 2 == 0)
      console.log(res) // false

      // some用在只要有的情况，例如有个数组，要判断数组里有没有偶数
      const res2 = list.some(v => v % 2 === 0)
      console.log(res2) // true
    </script>
  </body>
</html>
